package com.semac.client.rpc;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.semac.shared.exceptions.AuthenticationException;
import com.semac.shared.model.Pessoa;

@RemoteServiceRelativePath("ServicoAutenticacaoRPC")
public interface ServicoAutenticacaoRPC extends RemoteService {
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static ServicoAutenticacaoRPCAsync instance;
		public static ServicoAutenticacaoRPCAsync getInstance(){
			if (instance == null) {
				instance = GWT.create(ServicoAutenticacaoRPC.class);
			}
			return instance;
		}
	}
	
	public Pessoa getPessoaLogada();
	
	public void fazLogin(String user, String senha) throws AuthenticationException; 
	
	public void fazLogout();
	
}
